In computer networking, a packet is a formatted unit of data carried by a network. A packet typically consists of two kinds of data: control and payload. The control data provides information the network needs to deliver the packet, for example: source and destination addresses, error detection codes like checksums, and sequencing information. Typically, control data is found in packet headers and trailers, with payload data in between.
A router is a device that forwards packets within or between networks. A router can connect to two or more data lines from different networks. When a data packet arrives via one of the lines, the router can read address information in the packet to determine its ultimate destination. Then, using information in a routing table or routing policy, the router can direct the packet towards its destination.